<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>欠缴租金详情 / {$charge.house_addr}</h3></div>
                <div class="fr hidden">
                    <form class="search-form" method="post" action="">
                        <input name="field" value="{$context.field}" type="hidden" />
                        <input name="value" value="{$context.value}" type="hidden" />
                        <input name="type" value="{$context.type}" type="hidden" />
                        <input name="page" value="{$context.page}" type="hidden" />
                        <input name="order_field" value="{$context.order_field}" type="hidden" />
                        <input name="order_sort" value="{$context.order_sort}" type="hidden" />
                        <input name="offset" value="{$context.offset}" type="hidden" />
                        <input name="id" value="{$context.id}" type="hidden" />
                    </form>
                </div>
            </div>
            <div class="line2">
                <!-- 编辑按钮组 -->
                <div class="fl form-btn-group btn-group-edit">
                    <if condition="$charge.state eq '未缴'">
                        <in name="$x|default='02-01-05'" value="$rightsCode">
                            <button onclick="showDialog('dialog-pay');" class="btn-save btn-highlight">缴纳租金</button>
                            <span>或</span>
                            <a onclick="action_edit();" class="linkBtn btn-abort" href="javascript:void(0);">编辑</a>
                            <else />
                            <button disabled="disabled" class="btn-save btn-disable">缴纳租金</button>
                        </in>
                        <else />
                        <button disabled="disabled" class="btn-save btn-disable">缴纳租金</button>
                    </if>
                </div>
                <!-- 保存按钮组 -->
                <div class="fl form-btn-group btn-group-save hidden">
                    <button onclick="action_save();" class="btn-save btn-highlight">保 存</button>
                    <span>或</span>
                    <a class="linkBtn btn-abort" onclick="action_abort();" href="javascript:void(0);">放弃</a>
                </div>
                <div class="fl form-btn-more">
                    <button class="btn-normal btn-more">
                        更多操作<i class="drop-down"></i>
                    </button>
                    <ul class="more-action hidden">
                        <li><a onclick="action_send();" href="javascript:void(0)">发送催租短信</a></li>
                        <li><a onclick="action_del2();" href="javascript:void(0);">删除此记录</a></li>
                    </ul>
                </div>
                <div class="fr form-search-count">
                    <span class="index">{$context.index}/{$page.total}</span>
                    <button onclick="ItemJump({$page.prev.id}, {$page.prev.offset});" class="btn-normal">上一条</button>
                    <button onclick="ItemJump({$page.next.id}, {$page.next.offset});" class="btn-normal">下一条</button>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box2">
        <div>
            <form id="chargeForm" method="post" action="">
                <!--表单相关原始信息存储-->
                <input type="hidden" name="old_remarks" value="{$charge.remarks}" />
                <table class="form">
                    <tr>
                        <th width="15%">小区名称<span class="hint">*</span></th>
                        <td width="35%" field="community">{$charge.community}</td>
                        <th width="15%">房源地址</th>
                        <td width="35%" field="house_addr">{$charge.house_addr}</td>
                    </tr>
                    <tr>
                        <th>房源面积</th>
                        <td field="house_size">{$charge.house_size}</td>
                        <th>业务申请编号<span class="hint">*</span></th>
                        <td field="yw_no">{$charge.yw_no}</td>
                    </tr>
                    <tr>
                        <th>姓名<span class="hint">*</span></th>
                        <td field="name">{$charge.name}</td>
                        <th>联系电话<span class="hint">*</span></th>
                        <td field="phone">{$charge.phone}</td>
                    </tr>
                    <tr>
                        <th>月租金</th>
                        <td field="zj">{$charge.zj}</td>
                        <th>市场月租金</th>
                        <td field="mzj">{$charge.mzj}</td>
                    </tr>
                    <tbody class="charge-read">
                    <tr>
                        <th>租金开始日期<span class="hint">*</span></th>
                        <td field="date1">{$charge.date1}</td>
                        <th>租金结束日期<span class="hint">*</span></th>
                        <td field="date2">{$charge.date2}</td>
                    </tr>
                    <tr>
                        <th>欠缴总租金<span class="hint">*</span></th>
                        <td field="total">{$charge.total}</td>
                        <th>欠缴年份<span class="hint">*</span></th>
                        <td field="year">{$charge.year}</td>
                    </tr>
                    <tr>
                        <th>租金减免类型<span class="hint">*</span></th>
                        <td field="derate_type">{$charge.derate_type}</td>
                        <th>减免后应缴金额<span class="hint">*</span></th>
                        <td field="total2">{$charge.total2}</td>
                    </tr>
                    </tbody>
                    <tbody class="charge-edit hidden">
                    <tr>
                        <input name="dibaork" value="{$charge.dibaork}" type="hidden" />
                        <input name="size" value="{$charge.house_size}" type="hidden" />
                        <input name="zj" value="{$charge.zj}" type="hidden" />
                        <th>租金开始日期<span class="hint">*</span></th>
                        <td field="date1"><input name="date1" value="{$charge.date1}" type="text" /></td>
                        <th>租金结束日期<span class="hint">*</span></th>
                        <td field="date2"><input name="date2" value="{$charge.date2}" type="text" /></td>
                    </tr>
                    <tr>
                        <th>欠缴总租金<span class="hint">*</span></th>
                        <td field="total"><input name="total" value="{$charge.total}" type="text" /></td>
                        <th>欠缴年份<span class="hint">*</span></th>
                        <td field="year"><input name="year" value="{$charge.year}" type="text" /></td>
                    </tr>
                    <tr>
                        <th>租金减免类型<span class="hint">*</span></th>
                        <td>
                            <select name="derate_type">
                                <option value="" derate="0">-- 请选择租金减免类型 --</option>
                                <volist name="derate_type" id="vo">
                                    <if condition="$charge[derate_type] eq $vo[0]">
                                        <option selected="selected" value="{$vo[0]}" derate="{$vo[1]}">{$vo[0]}</option>
                                        <else />
                                        <option value="{$vo[0]}" derate="{$vo[1]}">{$vo[0]}</option>
                                    </if>
                                </volist>
                            </select>
                        </td>
                        <th>减免后应缴金额<span class="hint">*</span></th>
                        <td field="total2"><input name="total2" value="{$charge.total2}" type="text" /></td>
                    </tr>
                    </tbody>
                    <tr>
                        <th>年审编号</th>
                        <td field="no">{$charge.no}</td>
                        <th>年审状态</th>
                        <td field="state_ns">{$charge.state_ns}</td>
                    </tr>
                    <tr>
                        <th >缴费状态</th>
                        <td field="house_addr">{$charge.state}</td>
                        <th >缴费日期</th>
                        <td field="pay_date">{$charge.pay_date}</td>
                    </tr>
                    <tr>
                        <th>支付票号</th>
                        <td field="pay_no">{$charge.pay_no}</td>
                        <th>备注</th>
                        <td field="remarks" colspan="3">{$charge.remarks}</td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<link type="text/css" href="__JS__/datetimepicker/pikaday.css" rel="stylesheet">
<script src="__JS__/datetimepicker/pikaday.min.js" type="text/javascript"></script>
<div class="dialog dialog-pay hidden">
    <div class="box" style="height:380px;">
        <div class="title">
            <h4 class="fl">缴纳租金对话框</h4>
            <span class="fr"><a href="#" onclick="closeDialog();">关闭</a></span>
        </div>
        <table class="form-tab">
            <tr>
                <th width="80">房源编号：</th>
                <td>
                    <input name="dataId" value="{$charge.id}" type="hidden" />
                    <input disabled="disabled" name="house_addr" value="{$charge.house_addr}" type="text" style="width:180px;" />
                </td>
            </tr>
            <tr><th width="80">缴纳人姓名：</th>
                <td>
                    <input name="name" value="{$charge.name}" type="text" style="width:180px;" />
                </td>
            </tr>
            <tr><th width="80">租金金额：</th>
                <td>
                    <input disabled="disabled" name="final_total" value="{$charge.final_total}" type="text" style="width:180px;" />
                </td>
            </tr>
            <tr><th width="80">预缴金额：</th>
                <td>
                    <input disabled="disabled" name="prepay" value="{$charge.prepay}" type="text" style="width:180px;" />
                    <label style="font-size:0.7rem;">用于抵扣租金</label>
                </td>
            </tr>
            <tr><th width="80">应缴金额：</th>
                <td>
                    <input disabled="disabled" name="total2" value="{$charge.total2}" type="text" style="width:180px;font-size:1rem;color:green;font-weight:bold;" />
                </td>
            </tr>
            <tr><th>缴纳日期：</th>
                <td>
                    <input style="width:100px;" value="{$ctime|default=time()|date='Y/m/d',###}" name="pay_date" type="text" />
                </td>
            </tr>
            <tr style="display:none;"><th>备注：</th>
                <td>
                    <textarea style="width:210px;height:60px;" name="remarks"></textarea>
                </td></tr>
            <tr>
                <td colspan="2" style="text-align: center;line-height:40px;">
                    <button class="btn btn-highlight" onclick="action_payRental();">提交</button>
                    <span>或</span>
                    <a href="#" onclick="closeDialog();" class="linkBtn">放弃</a>
                </td>
            </tr>
        </table>
    </div>
</div>
<include file="Public:zujinMsg_dialog" />
<script src="__JS__/charge.js?v=0.4" type="text/javascript" ></script>
<include file="Public:footer" />
